package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcClassBook;
import com.visizen.wisdomclass.server.model.WcClassBookExample;
import java.util.List;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcClassBookMapper {
    @SelectProvider(type=WcClassBookSqlProvider.class, method="countByExample")
    int countByExample(WcClassBookExample example);

    @DeleteProvider(type=WcClassBookSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcClassBookExample example);

    @Insert({
        "insert into wc_class_book (ID, CLASS_ID, ",
        "USER_ID, REMARKS, ",
        "IS_PUBLIC)",
        "values (#{ID,jdbcType=VARCHAR}, #{CLASS_ID,jdbcType=VARCHAR}, ",
        "#{USER_ID,jdbcType=VARCHAR}, #{REMARKS,jdbcType=VARCHAR}, ",
        "#{IS_PUBLIC,jdbcType=INTEGER})"
    })
    int insert(WcClassBook record);

    @InsertProvider(type=WcClassBookSqlProvider.class, method="insertSelective")
    int insertSelective(WcClassBook record);

    @SelectProvider(type=WcClassBookSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="CLASS_ID", property="CLASS_ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="USER_ID", property="USER_ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="REMARKS", property="REMARKS", jdbcType=JdbcType.VARCHAR),
        @Result(column="IS_PUBLIC", property="IS_PUBLIC", jdbcType=JdbcType.INTEGER)
    })
    List<WcClassBook> selectByExample(WcClassBookExample example);

    @UpdateProvider(type=WcClassBookSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcClassBook record, @Param("example") WcClassBookExample example);

    @UpdateProvider(type=WcClassBookSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcClassBook record, @Param("example") WcClassBookExample example);
}